package cn.xfdzx.android.apps.shop.model;


import cn.xfdzx.android.apps.shop.bean.AddressListBeen;
import cn.xfdzx.android.apps.shop.bean.DeleteAddressBeen;
import cn.xfdzx.android.apps.shop.bean.LogisticsBeen;
import cn.xfdzx.android.apps.shop.bean.NewOrderBeen;
import cn.xfdzx.android.apps.shop.contract.ConfirmRetailContract;
import cn.xfdzx.android.apps.shop.net.RetrofitClient;
import io.reactivex.Flowable;

/**
 * @author azheng
 * @date 2018/6/4.
 * Description：
 */
public class ConfirmRetailModel implements ConfirmRetailContract.Model {


    @Override
    public Flowable<DeleteAddressBeen> delectAddress(String id) {
        return RetrofitClient.getInstance().getApi().delAddress( id);
    }

    @Override
    public Flowable<DeleteAddressBeen> defultAddress(String id) {
        return RetrofitClient.getInstance().getApi().defultAddress( id);
    }

    @Override
    public Flowable<AddressListBeen> initAddressData(String page, String limit) {
        return RetrofitClient.getInstance().getApi().addressList( page,limit);
    }

    @Override
    public Flowable<LogisticsBeen> logistics(String address_id, String orderKey) {
        return RetrofitClient.getInstance().getApi().logistics( address_id,orderKey);
    }


    @Override
    public Flowable<NewOrderBeen> confirmRetail(String orderKey, String couponId, String marks, String payType, String addressId, String leftName, String rightName, String pick_up_time, String reserved_mobile_phone, String delivery_method, String logistics_type, String order_express_type) {
        return  RetrofitClient.getInstance().getApi().retailGoodsOrder( orderKey,  couponId,  marks,  payType,  addressId,  leftName,  rightName,  pick_up_time,  reserved_mobile_phone,  delivery_method,logistics_type,order_express_type);

    }


}
